package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Client;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ClientMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Client record);

    Client selectByPrimaryKey(Long id);

    List<Client> selectAll();

    int updateByPrimaryKey(Client record);

    int query4Count(QueryObject qo);

    List<Client> query4List(QueryObject qo);

    List<Client> query4Prospect(QueryObject qo);

    int query4ProspectCount(QueryObject qo);

    void updateClient(@Param("oldId") Long oldId, @Param("newId") Long newId, @Param("insertTime") Date insertTime);

    void resourcePool(Long clientId);

    void positive(Long clientId);

    void updateByStudentTracking(Client client);

    void updateByTracking(Long id);

    void updateClientInfo(Client client);

    Client getClient(@Param("tel") String tel, @Param("name") String name);
}